package com.swu.pad.assignment.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

@Entity
@Table(name = "assignment")
public class Assignment {
	
	public static final String TYPE_SINGLE = "1";// 个人作业
	public static final String TYPE_GROUP = "2";// 小组作业
	
	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	@Column(name = "id")
	private String id;
	@Column(name = "create_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date createTime;
	// 作业类型
	@Column(name = "assignment_type")
	private String assignmentType;
	// 作业名称
	@Column(name = "assignment_name")
	private String assignmentName;
	// 作业描述
	@Column(name = "description")
	private String description;
	// 作业题目
	@Column(name = "assignment_content")
	private String assignmentContent;
	// 开始时间
	@Column(name = "start_date")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date startDate;
	// 结束时间
	@Column(name = "end_date")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date endDate;
	// 所属课程
	@Column(name = "course_id")
	private String courseId;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getAssignmentType() {
		return assignmentType;
	}

	public void setAssignmentType(String assignmentType) {
		this.assignmentType = assignmentType;
	}

	public String getAssignmentName() {
		return assignmentName;
	}

	public void setAssignmentName(String assignmentName) {
		this.assignmentName = assignmentName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getAssignmentContent() {
		return assignmentContent;
	}

	public void setAssignmentContent(String assignmentContent) {
		this.assignmentContent = assignmentContent;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}

}
